<!DOCTYPE html>
<html{% block manifest %}{% endblock %}>
<head>
  <meta charset="utf-8" />
  <meta name="description" content="{% block meta_description %}A resource for developers looking to put HTML5 to use today, including information on specific features and when to use them in your apps.{% endblock %}" />
  <meta name="keywords" content="html5,html 5,html5 demos,html5 examples,javascript,css3,notifications,geolocation,web workers,apppcache,file api,filereader,offline,audio,video,drag and drop,chrome" />
  <title>HTML5Rocks - {% block headtitle %}{% endblock %}</title>
  <link rel="stylesheet" href="/css/base.css" />
  <link rel="stylesheet" href="/css/prettify.css" />
  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Serif|Droid+Sans:regular,bold" />
  <script src="/js/modernizr-1.1.min.js"></script>
  <script src="/js/prettify.js"></script>
  <script>
    function isCompatible() {
      {% block iscompatible %}
      return null;
      {% endblock %}
    }
  </script>
  {% block head %}{% endblock %}
</head>
<body onload="{% block onload %}{% endblock %}">
  <div id="wrap">
    <div id="content">
      {% block body %}{% endblock %}
    </div>
  </div>
  <script>
    (function() {
      var lis = document.querySelectorAll('header nav li');
      var i = lis.length;
      while (i--) {
        var a = lis[i].querySelector('a');
        var section = a.getAttribute("data-section");
        if (new RegExp(section).test(document.location.href)) {
          a.className = 'current';
        }
      }

      prettyPrint();

      if (isCompatible() === false) {
        document.getElementById('notcompatible').className = "";
      } else if (isCompatible() === true) {
        document.getElementById('compatible').className = "";
      }

      window.addEventListener && document.querySelector('#title').addEventListener('click', function() {
        window.location = '/';
      }, false);
      
      
      // kill those feedburner and marketing tracking arguments cuz they're ugly. 
      if (/^\?utm_/.test(location.search) && history.replaceState){  
        history.replaceState({},'', location.href.replace(/\?utm_.*/,'')); 
      }
      
    })();

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-15028909-1']);
    _gaq.push(['_trackPageview']);
    (function() {
     var ga = document.createElement('script');
     ga.type = 'text/javascript';
     ga.async = true;
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0];
     s.parentNode.insertBefore(ga, s);
    })();
  </script>
</body>
</html>
